/*
 * 本程序以文件作为输入流
 * */
#include <iostream>
#include "../Headers/scan.h"
#include "../Headers/semantic.h"
using namespace std;

const char *const file="../Others/test.txt";
int line=1;
string sources;
void setStdin(){
    freopen(file,"r",stdin);
}
void initSource(){
    char ch;
    int i=0;
    while ((ch=getchar())!=EOF){
        sources+=ch;
       // cout<<ch;
    }
    sources+=ch;
}
int main() {
    /*设置输入流*/
    setStdin();
    initSource();
    Irparse();
    /*Word word=Scanner();
    while (word.syn!=_SYN_END){
        cout<<"("<<word.value<<","<<word.syn<<")"<<endl;
        word=Scanner();
    }*/
    return 0;
}
